package com.huiqiao.lesson6.beanConfig.Bean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanConfig {

    @Bean
    public Role role() {
        System.out.println("通过 @Bean 装配 Role");
        userRole();
        return new Role();
    }

    @Bean
    public UserRole userRole() {
        System.out.println("通过 @Bean 装配 UserRole");
        return new UserRole();
    }
}
